<template>
  <div>
    <!-- <p>新增签到</p> -->
  </div>
</template>
<script>
export default {
  data() {
    return {
      form: {
        title: '', //签到主题
        resId: '', //资源id
        resType: 'OC', //资源类型1-章节，OC-开课管理课程主题
        actNum: '', //实到人数
        dueNum: '999', //应到人数
        startTime: '2000-01-01 0:00', //开始签到时间 2023-04-13 9:00
        endTime: '2200-01-01 0:00', //截止截止时间 2023-04-13 9:30
        addr: '', //地址
        signTime: '',
      },
    }
  },
  mounted() {
    this.$bus.$on('showDialogSignInAdd', this.init)
  },
  beforeDestroy() {
    this.$bus.$off('showDialogSignInAdd')
  },
  methods: {
    //显示弹窗
    async init(row) {
      this.form.title = row.title
      this.form.resId = row.id
      await this.$store.dispatch('addeduSignIn', this.form)
      this.successMsg('操作成功')
    },
  },
}
</script>